process {

    withName: SEQFU_STATS_BEFORE {
        ext.prefix = { "${meta.id}_before" }
    }

    withName: SEQFU_STATS_AFTER {
        ext.prefix = { "${meta.id}_after" }
    }

    withName: SEQKIT_SEQ {
        ext.args = [
            "--remove-gaps",
            "--upper-case",
            "--validate-seq",
            "--min-len 30",
            "--max-len 5000"
        ].join(' ').trim()
        ext.prefix = "intermediate_seqkit_seq"
    }

    withName: SEQKIT_REPLACE {
        ext.args   = '-p "/" -r "_"'
        ext.suffix = "fasta"
        ext.prefix = "intermediate_seqkit_replace"
    }

}
